package com.zwz.resp;

import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.Data;
import java.util.*;

@Data
public class LicenseInfo {
    private Integer stat;

    @JsonProperty("licence_list")
    private List<License> licenses;

    @Data
    public static class License {
        @JsonFormat(pattern = "yyyy-MM-dd")
        @JsonProperty("beginDate")
        private Date startDate;

        @JsonFormat(pattern = "yyyy-MM-dd")
        @JsonProperty("endDate")
        private Date expiryDate;

        private String name;
        private String authority;
        private String content;
        private String id;

        @JsonProperty("licenseLink")
        private String licenseUrl;

        @JsonProperty("sourceAuthorityId")
        private String sourceAuthorityId;

        @JsonProperty("sourceAuthority")
        private String issuingAuthority;

        @JsonProperty("decideDate")
        @JsonFormat(pattern = "yyyy-MM-dd")
        private Date approvalDate;

        @JsonProperty("auditType")
        private String auditCategory;

        @JsonProperty("updateDate")
        @JsonFormat(pattern = "yyyy-MM-dd")
        private Date lastUpdateDate;

        // 处理非常规字段的映射
        @JsonAnySetter
        private Map<String, Object> additionalFields = new HashMap<>();
    }


}